<template>
  <div>
    <!-- 头部导航栏 -->
    <van-nav-bar
      title="问答"
      left-arrow
    />
    <!-- 主体内容部分 -->
    <div class="item-wrapper">
      <div class="item" v-for="(item, i) in list" :key="i">
        <div class="info-wrapper">
          <div class="title">
            作为IT行业的过来人，你有什么话想对后辈说的？
          </div>
          <div class="info">
            <div>
              <span>赞同</span>
              <span>1000+</span>
            </div>
            <div>
              <span>评论</span>
              <span>500+</span>
            </div>
            <div class="date">1小时前</div>   
          </div>
        </div>
        <img src="@/assets/qa.png" class="pic">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return { 
      list: [1, 2, 3, 4, 5],
    }
  }
}
</script>

<style  lang="less" scoped>
.item-wrapper {
  width: 100%;
  .item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    box-sizing: border-box;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    .info-wrapper {
      .info {
        display: flex;
        color: #999;
        font-size: 12px;
        >div {
        margin: 8px 8px 8px 0;
        }
      }       
    }
    .pic {
      object-fit: cover;
      width: 140px;
      height: 80px;
      border-radius: 4px;  
      margin-left: 16px;
    }
  }
}

</style>